




/*mybegin*/

function show_userInfo(result){
	
	var users=result.extend.userList;
	$.each(users, function(index, item) {
				var userTr=$("<tr></tr>");
				var usernameTd=$("<td></td>").addClass("center").text(item.name);
				var useridTd=$("<td></td>").addClass("center").text(item.id);
				var userpasswordTd=$("<td></td>").addClass("center").text(item.pwd);
				var useremailTd=$("<td></td>").addClass("center").text(item.email);
				var usersexTd=$("<td></td>").addClass("center").append($("<span></span>")
						.addClass("label-success label label-default").text(item.sex));
				var controllerTd=$("<td></td>").addClass("center");
				
				var changeA=$("<a></a>").addClass("btn btn-info myeditbtn").attr("userid",item.id);
				var changeI=$("<i></i>").addClass("glyphicon glyphicon-edit icon-white");
				var delA=$("<a></a>").addClass("btn btn-danger mydelbtn").attr("userid",item.id);
				var delI=$("<i></i>").addClass("glyphicon glyphicon-trash icon-white");
				
				changeA.append(changeI).append("修改");
				delA.append(delI).append("删除");
				
				controllerTd.append(changeA).append("&nbsp;").append(delA);
				
				userTr.append(useridTd).append(usernameTd).append(userpasswordTd)
				.append(useremailTd).append(usersexTd).append(controllerTd);
				
				$("#userinfo_table").append(userTr);
				
			
				
				
				
    	});
	/*begin---------------------*/
	/*end------------------*/
	}
	
function loadScript(url, callback) {
    var script = document.createElement("script");
    script.type = "text/javascript";
    if (typeof(callback) != "undefined") {
        if (script.readyState) {
            script.onreadystatechange = function() {
                if (script.readyState == "loaded" || script.readyState == "complete") {
                    script.onreadystatechange = null;
                    callback();
                }
            };
        } else {
            script.onload = function() {
                callback();
            };
        }
    };
    script.src = url;
    document.body.appendChild(script);
}



